package com.xb.loan.usercenter.account;

import com.xb.loan.util.SpringHelper;
import com.xb.loan.util.log.DefaultLoggerFacotry;
import com.xb.loan.util.log.LogFormatUtil;
import org.slf4j.Logger;

public class StartAccount {
	
	private static final Logger logger = DefaultLoggerFacotry.getLogger(StartAccount.class);

	public static void main(String[] args) {
		logger.info(LogFormatUtil.getFormatMsg(new String[]{"module", "msg"},
				new Object[]{"account", "prepare to start..."}));
		try{
			SpringHelper.init("classpath:/spring/applicationContext.xml");
			
			synchronized (StartAccount.class) {
				StartAccount.class.wait();
			}
			
		}catch(Exception e){
			logger.error(LogFormatUtil.getFormatMsg(new String[]{"module", "msg"},
					new Object[]{"account", "has some problem in the start..."}), e);
		}
		logger.info(LogFormatUtil.getFormatMsg(new String[]{"module", "msg"},
				new Object[]{"account", "start successfully..."}));
	}

}
